Skip to content

Add data models and mappers for PDF report#3755

Open
andreia-ferreira wants to merge 15 commits into
masterfrom
andreia/3739/formatters
Open

Add data models and mappers for PDF report#3755
andreia-ferreira wants to merge 15 commits into
masterfrom
andreia/3739/formatters

Conversation

@andreia-ferreira
Copy link
Copy Markdown
Collaborator

@andreia-ferreira andreia-ferreira commented May 26, 2026

Towards #3739

In order to split up the PDF feature in different PRs, this one is focused on adding the platform-independent UI model SubmissionPdfDocument which represents the structure of the future PDF, as well as specific formatters (DateFormatter; NumberFormatter) and the mapper TaskValueMapper which are needed to present the data.

This involved additional changes such as:

  • Some strings needed for the PDF report were moved from app to :core:ui. In order to make sure the multiplatform strings are valid a dedicated test was added for it ComposeStringResourcesTest
  • Added StringResolver which wraps Compose Multiplatform string resource resolution so that logic that uses resources can be easily unit tested without requiring a platform runtime
  • This PR doesn't introduce any functionality change, but multiple unit tests were added. This also required adding testAndroidHostTest to the Run unit tests step of the CI, to make sure unit tests for specific android implementations in KMP modules are also run

@shobhitagarwal1612 PTAL?

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.06%. Comparing base (86da325) to head (07f56b1).

Files with missing lines Patch % Lines
...otlin/org/groundplatform/domain/model/task/Task.kt 0.00% 1 Missing ⚠️
.../org/groundplatform/domain/util/NumberFormatter.kt 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3755      +/-   ##
============================================
- Coverage     68.06%   68.06%   -0.01%     
+ Complexity     1613     1612       -1     
============================================
  Files           368      369       +1     
  Lines          9528     9534       +6     
  Branches       1242     1244       +2     
============================================
+ Hits           6485     6489       +4     
- Misses         2376     2377       +1     
- Partials        667      668       +1     
Files with missing lines Coverage Δ
...datacollection/DataSubmissionConfirmationScreen.kt 91.57% <100.00%> (ø)
...ion/tasks/multiplechoice/MultipleChoiceItemView.kt 56.00% <100.00%> (ø)
...id/ui/home/mapcontainer/jobs/ShareLocationModal.kt 64.06% <100.00%> (ø)
...undplatform/domain/usecases/GetLoiReportUseCase.kt 89.13% <100.00%> (-0.87%) ⬇️
...otlin/org/groundplatform/domain/model/task/Task.kt 90.90% <0.00%> (-4.33%) ⬇️
.../org/groundplatform/domain/util/NumberFormatter.kt 88.88% <88.88%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants